package com.keshan.mapper;

import com.keshan.pojo.MdUser;
import com.keshan.pojo.MdUserExample;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository(value="MdUserMapper")
public interface MdUserMapper {
    int countByExample(MdUserExample example);

    int deleteByExample(MdUserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MdUser record);

    int insertSelective(MdUser record);

    List<MdUser> selectByExample(MdUserExample example);

    MdUser selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MdUser record, @Param("example") MdUserExample example);

    int updateByExample(@Param("record") MdUser record, @Param("example") MdUserExample example);

    int updateByPrimaryKeySelective(MdUser record);

    int updateByPrimaryKey(MdUser record);

    int updateByUserName(MdUser record);

    Integer getIdByUserName(String userName);

    /**
     * @author tangzheng
     * @date 2023/2/11 21:39
     * @description 根据openid查询user
     * @param openid openid
     * @return mdUser
     */
    MdUser selectUserByOpenid(String openid);

    /**
     * @param user 需要更改的信息
     * @author tangzheng
     * @date 2023/2/11 22:52
     * @description 根据用户名更改用户相关信息
     */
    void updateByUsernameSelective(MdUser user);
}
